/**
 * Created by graysoft on 2017/2/22.
 */
import React,{Component} from "react";
import FavorJson from "../../JSON/favor.json";


export default class Content extends Component{
    constructor(props){
        super(props)
    }

    favorList(){
        let favorList = [];
        FavorJson.forEach(
            (v,index)=>{
                favorList.push(
                        <li key={index}>
                            <span className="favor_icon">{v.icon}</span>
                            <span className="favor_text">{v.name}</span>
                        </li>
                );
            }
        )
        return favorList;
    }

    render() {
        return (
            <aside id="favor" className="opened">
                <ul>
                    {this.favorList()}
                </ul>
            </aside>
        )
    }
}